package serial_cli

import (
	"fmt"
	"github.com/spf13/cobra"
	"time"
)

func VersionCmd() *cobra.Command {
	cmd := &cobra.Command{
		Use:   "version",
		Short: "查看当前版本号",
		Long:  `查看当前版本号`,
		Run: func(cmd *cobra.Command, args []string) {
			//todo
			fmt.Printf("version   : %s\n", "0.01")
			fmt.Println("current_time: ", time.Now().Format("2006-01-02 15:04:05"))
			//fmt.Printf("GIT_COMMIT: %s\n", "start.GIT_VERSION")
			//fmt.Printf("BUILD_TIME: %s\n", "start.BUILD_TIME")
		},
	}
	return cmd
}
